package com.huluobo.lib_base.net

import com.blankj.utilcode.util.SPUtils
import okhttp3.Interceptor
import okhttp3.Response

/**
 *  Created by LC on 2025/9/13.
 *  token拦截器
 */
class TokenInterceptor : Interceptor {
    override fun intercept(chain: Interceptor.Chain): Response {
        val request = chain.request().newBuilder()
            .addHeader(
                Const.PARAM_TOKEN,
                SPUtils.getInstance().getString(Const.PARAM_TOKEN)
            ).build()
        return chain.proceed(request)
    }
}